package com.nut.spp.api.client;

import com.nut.spp.common.Result;
import com.nut.spp.entity.Banner;
import com.nut.spp.service.BannerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 首页 banner
 */
@RestController
@RequestMapping("/client/banner")
@Slf4j
public class BannerController {

    @Autowired
    private BannerService bannerService;

    @GetMapping("/list")
    public Result<List<Banner>> list() {
        Result<List<Banner>> list = bannerService.list();
        return list;
    }

}
